﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WeatherStationSys.Interface
{
    /// <summary>
    /// 最高监测值，最低监测值数据接口
    /// </summary>
    public interface IHiLoData
    {
        /// <summary>
        /// 持久化数据
        /// </summary>
        /// <param name="value">当前值</param>
        /// <param name="time">当前时间</param>
        bool CurrentReading(double currentValue, long time);

        /// <summary>
        /// 新的1天
        /// </summary>
        /// <param name="initial">初始值</param>
        /// <param name="time">当前时间</param>
        void NewDay(double initial, long time);

        /// <summary>
        /// 得到最大值
        /// </summary>
        /// <returns></returns>
        double GetHeightValue();

        /// <summary>
        /// 得到最大值的时间
        /// </summary>
        /// <returns></returns>
        long GetHeightTime();

        /// <summary>
        /// 得到最小值
        /// </summary>
        /// <returns></returns>
        double GetLowerValue();

        /// <summary>
        /// 得到最小值的时间
        /// </summary>
        /// <returns></returns>
        long GetLowerTime();

        /// <summary>
        /// 老版本持久化数据
        /// </summary>
        /// <param name="value">当前值</param>
        /// <param name="time">当前时间</param>
        void DeformedVeiosnCurrentReading(double currentValue, long time);
    }
}

